/*******************************************************************************
* Project: QSAR(Cute Software Architecture) 
*
* Copyright: Copyright(C) 2024 by YuetingBen, All Rights Reserved
*
* File name: DcmDspDidType.h
*
* Brief: ;
*
* Author: Yueting.Ben
*
* Module: $MainMOD$
*
* Revision:
* --------------------------------------------------------------------------------
* v0.1: 
* --Yueting.Ben, 2024-03-21 
* --Initial release

**********************************************************************************/
#ifndef DCMDSPDIDTYPE_H
#define DCMDSPDIDTYPE_H

/** HEADER FILES **/
#include "DcmType.h"
#include "DcmDspSvc10Type.h"
#include "DcmDspSvc27Type.h"


/** MACRO DEFINITION **/


/** TYPEDEF DEFINITION **/
typedef uint16 DcmDspDidIdentifierType;


typedef struct
{
    Dcm_ReadDataFncType dataReadFnc;
    Dcm_WriteDataFncType dataWriteFnc;
    Dcm_ProcessorFncType dataReturnControlToEcuFnc;
    Dcm_ProcessorFncType dataResetToDefaultFnc; 
    Dcm_ProcessorFncType dataShortTermAdjustmentFnc;
    uint8 dataByteSize;
}DcmDspDataType;


typedef struct
{
    uint8 dataByteSize;
    uint8 didByteOffset;
    DcmDspDataType* didDataPtr;
}DcmDspDidSignalType;


typedef struct
{
    DcmDspSessionType didReadSessionLevel;
    DcmDspSecurityType didReadSecurityLevel;
}DcmDspDidReadInfoType;


typedef struct
{
    DcmDspSessionType didWriteSessionLevel;
    DcmDspSecurityType didWriteSecurityLevel;
}DcmDspDidWriteInfoType;


typedef struct
{
    DcmDspSessionType didControlSessionLevel;
    DcmDspSecurityType didControlSecurityLevel;
}DcmDspDidControlInfoType;


typedef struct
{
    DcmDspDidIdentifierType did;
    uint8 didUsed;
    uint8 didSize;
    DcmDspDidReadInfoType readAccess;
    DcmDspDidWriteInfoType writeAccess;
    DcmDspDidControlInfoType controlAccess;
    uint8 signalNum;
    DcmDspDidSignalType* signalPtr;
}DcmDspDidInfoType;


#endif

